package com.qf.mapper;/*
 *保护你的大熊
 *2021/11/18
 *20:12
 */

import com.qf.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {

    @Select("select * from t_user")
    public List<User> findAll();

    @Options(useGeneratedKeys = true , keyProperty = "id")
    @Insert("insert into t_user (username,password,gender,regist_time) values (#{user.username},#{user.password},#{user.gender},#{user.registTime})")
    public void insertUser(@Param("user") User user);

    @Delete("delete from t_user where id=#{id}")
    public void deleteUser(@Param("id") Integer id);

    public void updateUser(User user);
}
